<%-- 
    Document   : Employee
    Created on : May 9, 2012, 9:28:43 AM
    Author     : Nguyen Hung
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>



        <link rel="stylesheet" type="text/css" href="../css/richTable.css"/>


        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){  
                
                initThickBox('.thickbox');
                $j('.predebt').live('click',function(){
                    var pt950 = $j(this).attr('lang'); 
                    pt950ii =0;
                    $j('.debtContent').slideUp();
                    $j('.debtContent').html(''); 
                    var debt = $j(this).parent().parent().next().find('.debtContent');                    
                    if(debt.hasClass('active')){
                        debt.removeClass('active');
                    }else{
                                                 
                        debt.removeClass('active');
                        debt.addClass('active');                                               
                        showPleaseWait();
                        $j.post('predebtCN.jsp?action=predebt&ft950='+pt950,function(data){                      
                            if(data !=null){
                                //                                alert(sms.attr('class'));
                                debt.css('min-height','50px');
                                debt.html(data);
                                debt.slideDown();
                                hidePleaseWait();
                            }
                        });

                     
                    }
                });
               
               
            });
        </script>
        <style type="text/css">
            .predebt{
                cursor: pointer;
            }
            .debtContent{
                border-bottom: 1px solid #C4C0C9;
                width: 877px;
                background-image: -moz-linear-gradient(59% 55% 90deg, #DADDDE, #FFFFFF);
                background-image:-webkit-gradient(linear, 0 0%, 0 50%, from(#FFFFFF), to(#DADDDE));
                box-shadow:#BEC2C4 0 1px 2px;
                /*   background-image: -moz-linear-gradient(19% 75% 90deg, #BEC2C4, #FFFFFF);
                  background-image:-webkit-gradient(linear, 0 0%, 0 100%, from(#FFFFFF), to(#BEC2C4))
                  background:#FAF6D1; */
            }
            .odd {
                background: none repeat scroll 0 0 #E0EFFC;
            }


            .rich-dtascroller-table {
                background-color: #FFFFFF;
                border-color: #82A6C7;
                float: right;
                margin-right: 0 !important;
                margin-top: 10px !important;
            }
            .rich-table-cell 
            {
                border-bottom: 1px solid #C4C0C9;
                border-right: 1px solid #C4C0C9 ;
                color: #000000;
                font-family: Arial,Verdana,sans-serif;
                font-size: 11px;
                padding: 0px !important;
            }
            .content .scrolls{
                width:800px !important;
                float:left;

                overflow:auto;
            }
            .content .rich-table{
                width:800px !important;
                float:left;

                overflow:auto;
            }
            .content table{
            
                float:left;
            }
            .content_table {
                width:914px !important;
                float:left;

                overflow:auto;
            }

            .text_center{
                text-align: center;
            }
            .text_right{
                text-align: right;
            }
            .fieldset, img {
                border: 0 none;

            }
            .date_test{
                height: 32px;
                width:135px;
                text-align: center;
            }
            .loaigd{

                width:134px;
                padding: 9px;
                height: 14px;


            }
            .loaigdaa{

                width:282px;
                padding: 9px;
                height: 14px;


            }
            .hoten{

                width:150px;
                padding: 9px;
                height: 14px;


            }
            .matour{
                padding: 9px;
                width:81px;
                height: 14px;
            }
            .tongchiphi{
                padding: 9px;
                width:100px;
                height: 14px;
            }
            .tiente{
                padding: 9px;
                width:23px;
                height: 14px;
            }
            .status{
                padding: 9px;
                text-align: center;
                width:22px;
                height: 14px;
            }
            .mota{
                padding: 9px;
                width:215px;
                height: 14px;
            }
            .ngayhieuluc{
                padding: 9px;
                width:58px;
                text-align: center;
                height: 14px;
            }
            .ngaylap{
                padding: 9px;
                width:57px;
                text-align: center;
                height: 14px;
            }
            .ngayxacnhan{
                height: 32px;
                text-align: center;
                width:135px;
            }

            .kiemduyet{
                text-align: center;
                width:63px;
                height: 32px;
            }
            .ngaycapnhat{
                padding: 9px;
                text-align: center;
                width: 128px;
                height: 14px;
            }
            .sua{
                height: 32px;
                text-align: center;
                width:60px;
            }
            .tailieu{
                width:55px;
                text-align: center;
                height: 32px;
            }

            .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}

            .buttonsearch2{
                border:0;
                background:url(../images/bg_submit.gif) repeat-x;
                width:68px;

                margin:0px 0 10px 20px;
                color:#ffffff;
                font-size:12px;
                font-weight:bold;
                cursor:pointer;
                border-radius:2px;
                padding:4px 0;
                text-transform:uppercase;
            }
            input{
                float:left;
                margin-left:9px;
            }
            select{
                float:left;
                height: 21px;
                width:70px;
                margin-left:9px;
            }
            .add{
                width: 50px;
                margin-top:3px;
                display: none;
            }
            .add input[type="text"]
            {
                width: 102px !important;
                height:20px !important;
                margin-right: 5px;
            }
            .add img
            {
                margin-top: 4px !important;
            }
            .date{
                float: left;
                margin-top:3px;
                margin-left: 7px;
            }
            .date1{
                float: left;
                margin-top:3px;
                margin-left: 7px;
            }
            .closeGroup{
                float: right;
                font-size: 14px;
                margin-right: 5px;
                width:150px;
                height:auto;
                position:absolute;
                background: #2B3844;
                color:white !important;
                top:30px;
                display:none;
                text-align: right;
            }
            .greyRow{
                background: #E0EFFC;
            }
            .whiteRow{
                background: #ffffff;
            }
            .white{
                background: #FFFFFF;
            }
            .blue{
                background: #E0EFFC;
            }
            .fillter{
                margin-top: 15px !important;
                height: 15px !important;
            }
            .viewTable{
                margin-left: 20px;
                width: 877px;
            }
            .table_thead{
                 width: 877px;
            }
            
            .add_fis{
                background-color: #E6E9EB;
            }
            .add_fis1{
                background-color: #BBBDBF; 
                /* background-color: #b2b7bb;*/
            }
            .predebt{
                cursor: pointer;
            }
            .closeGroup{
                z-index: 999;
            }
            .group{
                z-index: 999;
            }
            .rich-table-row{
                height: 32px !important;
            }
        </style>
    </head>


    <body>
        <f:view>
            <a4j:form>
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <div class="content_detail">
                    <div class="list_item_user">
                        <div class="item_content" style="display: block">
                            <div class="infomation_form"> 

                                <div class="item_work_content">
                                    <div style="float:left; height: auto; max-height: 600px !important; width:100%; overflow-x:auto; overflow-y:auto;"> 
                                        <div class="content_table " style="width: 877px;" >
                                            <h:panelGroup rendered="#{T950Bean.idtype==0}">
                                                <div class="rich_table viewTable" id="tableData">
                                                    <%-- header --%>
                                                    <table>
                                                        <tr class="table_thead">
                                                            <td class="table_subheadercell" style="width:40px "><h:outputText value="Chi tiết" escape="false"/></td>

                                                            <td class="table_subheadercell" style="width:60px "><h:outputText value="Chức năng" escape="false"/></td>

                                                            <td class="table_subheadercell" style="width:100px "><h:outputText value="Mã tour" escape="false"/></td>
                                                            <td class="table_subheadercell" style="width:100px "><h:outputText value="Tổng chi phí" escape="false"/></td>
                                                            <td class="table_subheadercell" style="width:50px "><h:outputText value="Tiền tệ" escape="false"/></td>
                                                            <td class="table_subheadercell" style="width:250px "><h:outputText value="Địa chỉ" escape="false"/></td>
                                                            <td class="table_subheadercell" style="width:213px "><h:outputText value="Mô tả" escape="false"/></td>

                                                        </tr>
                                                    </table>
                                                    <%-- content --%>
                                                    <div style="float:left; height: auto; max-height: 600px !important; overflow-x:auto; overflow-y:auto;"> 
                                                        <table>
                                                            <h:inputHidden value="#{T950Bean.FT950CN}" id="FT950CN"/>
                                                            <a4j:repeat value="#{T950Bean.listT950CNH}" var="item" rowKeyVar="index">  
                                                                <tr class="table_row" lang="<h:outputText value="#{item.pt950}"/>">

                                                                    <td class="table_cell cssCenter  <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}"  value="add_fis"/>" style="width: 40px">

                                                                        <h:graphicImage rendered="#{loginSession.right.DEB_LST_ITEM}" value="../images/history.png" height="15px" width="15px" alt="view" title="Xem" styleClass="predebt predebt#{item.pt950}" lang="#{item.pt950}">                                                            
                                                                        </h:graphicImage>

                                                                    </td>


                                                                    <td class="table_cell cssCenter  <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/>  <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis" />" style="width: 60px">

                                                                        <h:outputLink rendered="#{loginSession.right.DEB_LST_CRECN}"  style="margin-top: 5px;"  value="adddebt.jsp?action=editCNL&pt950=#{item.pt950}&page=customer.jsp&height=282px&width=345px" styleClass="fancybox add_new" id="fancybox11111">
                                                                            <img  src="../images/add_tab.png" height="15px" width="15px" title="Chức năng"/> 
                                                                        </h:outputLink>

                                                                    </td>
                                                                    <td class="table_cell cssCenter  <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis"/>" style="width: 100px">

                                                                        <h:outputText value="#{item.bv051}"/> 

                                                                    </td>

                                                                    <td class="table_cell cssRight  <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis"/>" style="width: 100px">

                                                                        <h:outputText value="#{item.tn951st}"/>   

                                                                    </td>
                                                                    <td class="table_cell cssCenter  <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis"/>" style="width: 50px">

                                                                        <h:outputText value="#{item.money}"/> 

                                                                    </td>
                                                                    <td class="table_cell   <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis"/>" style="width: 250px">

                                                                        <h:outputText value="#{item.nv112}"/>

                                                                    </td>

                                                                    <td class="table_cell   <h:outputText rendered="#{index%2 !=0 && item.ht1 == null && item.ht == null}"  value="odd"/> <h:outputText rendered="#{item.ht1 != null && item.ht != null}"  value="add_fis1"/> <h:outputText rendered="#{item.ht1 == null && item.ht != null}" value="add_fis"/>" style="width: 213px">

                                                                        <h:outputText value="#{item.tv971}"/> 

                                                                    </td>

                                                                </tr>
                                                                <tr>
                                                                    <td  colspan="19">
                                                                        <h:panelGroup  styleClass="debtContent" >
                                                                        </h:panelGroup>
                                                                    </td>
                                                                </tr>
                                                            </a4j:repeat>
                                                        </table>

                                                        <%--end content ---%>
                                                    </div>
                                                </h:panelGroup>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


                    <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                     height="30" width="40" zindex="2000">
                        <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                    </rich:modalPanel>
                </a4j:form>
            </f:view>
    </body>
</html>
